Skip to content

accounts/usbwallet: add support for Ledger Nano Gen5#33297

Merged
gballet merged 4 commits into
ethereum:masterfrom
mmsqe:add_gen5
Feb 3, 2026
Merged

accounts/usbwallet: add support for Ledger Nano Gen5#33297
gballet merged 4 commits into
ethereum:masterfrom
mmsqe:add_gen5

Conversation

@mmsqe
Copy link
Copy Markdown
Contributor

@mmsqe mmsqe commented Nov 27, 2025

adds support for the 0x0008 / 0x8000 product ID (Ledger Apex | Nano Gen5).

Copy link
Copy Markdown
Member

@gballet gballet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments. Basically, this should just be a single new line in the code.

We will also need to test it, as we don't have a ledger nano gen5 handy.

Comment thread accounts/usbwallet/hub.go Outdated
}
}
infos, err := hid.Enumerate(hub.vendorID, 0)
infos, err := usbEnumerate(hub.vendorID, 0)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is only used for the test, and the test isn't very useful. Please revert

Comment thread accounts/usbwallet/hub.go Outdated
Comment on lines +57 to +75
var ledgerProductIDs = []uint16{
// Original product IDs
0x0000, /* Ledger Blue */
0x0001, /* Ledger Nano S */
0x0004, /* Ledger Nano X */
0x0005, /* Ledger Nano S Plus */
0x0006, /* Ledger Nano FTS */
0x0007, /* Ledger Flex */
0x0008, /* Ledger Nano Gen5 */

0x0000, /* WebUSB Ledger Blue */
0x1000, /* WebUSB Ledger Nano S */
0x4000, /* WebUSB Ledger Nano X */
0x5000, /* WebUSB Ledger Nano S Plus */
0x6000, /* WebUSB Ledger Nano FTS */
0x7000, /* WebUSB Ledger Flex */
0x8000, /* WebUSB Ledger Nano Gen5 */
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't move that out there, we will lose track of which commit added which device. Simply add new entries in the old table.

Comment thread accounts/usbwallet/hub.go
Comment on lines +49 to +52
deviceUsagePage = 0xffa0
// deviceInterface identifies Ledger devices by USB interface number (0) on Linux.
deviceInterface = 0
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unlike the rest, this is ok to define constants for this

Comment thread accounts/usbwallet/hub_test.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good that you thought about writing a test, but this is just testing that enumeration matches what we already know, not what the system is going to return. Given that this test needs to swap the enumeration function - thus gutting a good chunk of the logic being tested, I suggest removing it.

@gballet gballet added this to the 1.17.0 milestone Feb 3, 2026
@gballet gballet merged commit b928876 into ethereum:master Feb 3, 2026
7 of 8 checks passed
gzliudan pushed a commit to gzliudan/XDPoSChain that referenced this pull request Feb 10, 2026
adds support for the 0x0008 / 0x8000 product ID (Ledger Apex | Nano
Gen5).
AnilChinchawale pushed a commit to XinFinOrg/XDPoSChain that referenced this pull request Feb 28, 2026
adds support for the 0x0008 / 0x8000 product ID (Ledger Apex | Nano
Gen5).

Co-authored-by: mmsqe <tqd0800210105@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants